package web.board.dao.impl;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
//import org.mybatis.spring.SqlSessionTemplate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import web.board.vo.RequestVo;

@Repository
public class BoardDaoImpl implements web.board.dao.BoardDao{

	@Autowired
	private SqlSession sqlSession;
	
	private static final Logger logger = LoggerFactory.getLogger(BoardDaoImpl.class);
	
	private static final String NAMESPACE = "web.board.dao.BoardDAO.";
	
	@Override
	public List<RequestVo> listAll() throws Exception{
		logger.debug("listAll start");
		
		return sqlSession.selectList(NAMESPACE + "boardList");
	}

	@Override
	public RequestVo selectBoardContent() throws Exception {
		logger.debug("listAll start");
		return sqlSession.selectOne(NAMESPACE + "selectBoardContent");
	}
	
	
}
